package com.pur.zsms.supplier.dao;

import java.util.List;

import com.pur.zsms.common.dao.JpaTemplate;
import com.pur.zsms.common.exception.GenericException;
import com.pur.zsms.common.support.PageController;
import com.pur.zsms.common.support.PaginationSupport;
import com.pur.zsms.matermanage.mater.po.MaterLevelPo;
import com.pur.zsms.matermanage.mater.vo.MaterVo;
import com.pur.zsms.matermanage.mater.vo.MaterVoForCostSupplier;
import com.pur.zsms.po.DistributorSupplierMaterPo;
import com.pur.zsms.po.SupplierShopUserPo;
import com.pur.zsms.storemanage.po.StorePo;
import com.pur.zsms.supplier.po.ShopSupplierTypePo;
import com.pur.zsms.supplier.po.SupplierDistributeMaterPo;
import com.pur.zsms.supplier.po.SupplierDistributePo;
import com.pur.zsms.supplier.po.SupplierPo;
import com.pur.zsms.supplier.po.SupplierQualificationPo;
import com.pur.zsms.supplier.po.SupplierUserPo;
import com.pur.zsms.supplier.vo.ShopSupplierTypeVo;
import com.pur.zsms.supplier.vo.ShopSupplierVo;
import com.pur.zsms.supplier.vo.SupplierDistributeMateVo;
import com.pur.zsms.supplier.vo.SupplierDistributeVo;
import com.pur.zsms.supplier.vo.SupplierOrderCustVo;
import com.pur.zsms.supplier.vo.SupplierQualificationVo;
import com.pur.zsms.supplier.vo.SupplierUserVo;
import com.pur.zsms.supplier.vo.SupplierVo;
import com.pur.zsms.systemsetting.datadictionary.po.Code;
import com.pur.zsms.vo.DistributorSupplierMaterVo;

public interface SupplierDao {
	/**
	 * 查询所有供应商
	 * 
	 * @param pageController
	 * @param SupplierPo
	 * @return
	 * @throws GenericException
	 */
	public PaginationSupport listSupplier(PageController pageController, SupplierVo supplierVo) throws GenericException;

	public PaginationSupport listSupplierCost(PageController pageController, MaterVoForCostSupplier tMaterVo) throws GenericException;

	public PaginationSupport listSupplier(PageController pageController, MaterVo tMaterVo) throws GenericException;

	public PaginationSupport findDistributeMater(PageController pageController, SupplierDistributeMateVo supplierDistributeMateVo)
			throws GenericException;

	public PaginationSupport findDistributeMaterForGather(PageController pageController, SupplierDistributeMateVo supplierDistributeMateVo)
			throws GenericException;

	public int findDistributeMater(SupplierDistributeMateVo supplierDistributeMateVo) throws GenericException;

	public PaginationSupport findCustForOrder(PageController pageController, SupplierOrderCustVo supplierVo) throws GenericException;

	public PaginationSupport findSupDistribute(PageController pageController, SupplierDistributeVo supplierVo) throws GenericException;

	public PaginationSupport findSupplierQualification(PageController pageController, SupplierQualificationVo supplierVo) throws GenericException;

	/**
	 * 查询客户和供应商关系
	 */
	public PaginationSupport listSupCus(PageController pageController, ShopSupplierVo suppCusVo) throws GenericException;

	/**
	 * 新增供货商
	 */
	public void addSupplier(SupplierPo c) throws GenericException;

	public void addSupplierUserPo(SupplierUserPo c) throws GenericException;

	public void addSupplierShopUserPo(SupplierShopUserPo c) throws GenericException;

	public void updateSupplierShopUserPo(SupplierShopUserPo c) throws GenericException;

	public void addSupplierDistributeMaterPo(SupplierDistributeMaterPo c) throws GenericException;

	public void updateSupplierDistributeMaterPo(SupplierDistributeMaterPo c) throws GenericException;

	public void addSupplierQualificationPo(SupplierQualificationPo c) throws GenericException;

	public void addSupplierDistribute(SupplierDistributePo c) throws GenericException;

	public void addDistributorSupplierMaterPo(DistributorSupplierMaterPo c) throws GenericException;

	public void addShopSupplierTypePo(ShopSupplierTypePo c) throws GenericException;

	/**
	 * 修改该供货商
	 * 
	 * @param c
	 * @throws GenericException
	 */
	public void updateSupplier(SupplierPo c) throws GenericException;

	/**
	 * 删除供货商
	 */
	public void deleteSupplier(SupplierPo c) throws GenericException;

	public void deleteDistributorSupplierMaterPo(DistributorSupplierMaterPo c) throws GenericException;

	public void deleteShopSupplierTypePo(int userId, int supId) throws GenericException;

	public void deleteSupplierDistributeMaterPo(int materId, int supId) throws GenericException;

	public void deleteSupplierDistribute(long disId, int supId, String disDate) throws GenericException;

	public SupplierPo findSupplierById(int id) throws GenericException;

	public List<SupplierPo> getAllSupPo() throws GenericException;

	public List<SupplierDistributeMaterPo> getSupplierDistributeMaterPoByMaterIdSupId(int materId, int supId) throws GenericException;

	public List<SupplierDistributeMaterPo> getSupplierDistributeMaterPoBySupId(int supId) throws GenericException;

	public List<SupplierPo> getAllSupPoCust() throws GenericException;

	public List<SupplierPo> getSupPoByUserId(int userId) throws GenericException;

	public List<ShopSupplierTypePo> getSuppCusPo(ShopSupplierVo c) throws GenericException;

	public List<ShopSupplierTypePo> getShopSupplierTypePo(ShopSupplierTypeVo c) throws GenericException;

	public List<ShopSupplierTypePo> getSuppCusPoByTypeCheck(ShopSupplierVo c) throws GenericException;

	public SupplierPo getSupPoByUserId(long userId) throws GenericException;

	public List<SupplierUserPo> getSupplierUserPo(SupplierUserVo tSupplierUserVo) throws GenericException;

	public SupplierUserPo getSupUserPoByUserId(long userId) throws GenericException;

	public StorePo getSupStoreHouseIdByUserId(long userId) throws GenericException;

	public SupplierPo getSupPoBySupId(String supId) throws GenericException;

	public List<SupplierPo> getSupPoAll() throws GenericException;

	public SupplierQualificationPo getSupplierQualificationPoByQid(int qid) throws GenericException;

	public List<SupplierPo> getSupPoByName(String supName) throws GenericException;

	public List<MaterLevelPo> getMaterLevelPoByMaterIdSupId(int materId, int supId) throws GenericException;

	public List<Object[]> getAllTotalByDate(String date, int supId, int custId, String custIdAll, String orderBy) throws GenericException;

	public List<Object[]> getAllTotalByDate(String date, int supId, String custIdAll, String orderBy) throws GenericException;

	public List<Object[]> getAllTotalByDate(String date, int supId) throws GenericException;

	public List<Object[]> getCustQuotationDate(int supId) throws GenericException;

	public List<Object[]> getAllTotalByUserIdALl(String date, int supId, String custIdAll) throws GenericException;

	public List<Object[]> getSupDistributeSummarySheet(String date, int supId, String materType, int storeHouseId, String shopIdAll)
			throws GenericException;

	public List<Object[]> getSupDistributeSummarySheetForGroupbyMaterType(String date, int supId) throws GenericException;

	public List<Object[]> getSupDistributeSummarySheetForMaterOrder(String date, int supId, int materId, int storeHouseId, String shopIdAll)
			throws GenericException;

	public List<Object> getSupDistributeSummarySheetLeaveMessageForMaterOrder(String date, int supId, int materId, String shopIdAll)
			throws GenericException;

	public List<Object[]> getSupDistributLeaveMessage(String date, int supId) throws GenericException;

	public List<Object[]> getUserIdDistributePoList(String date, int supId) throws GenericException;

	public List<Object[]> getExcelCust(String date, int supId) throws GenericException;

	public List<Object[]> getExcelCust(String date, int supId, String custIdAll) throws GenericException;

	public List<Object[]> getExcelCustForDistribute(String userIdAll) throws GenericException;

	public List<Object[]> getExcelCustAllRealMaterByDate(String date, int supId, String custId) throws GenericException;

	public List<Object[]> getExcelCustAllRealMaterByDateForPrint(String date, int supId, String custId) throws GenericException;

	public List<Object[]> getExcelCustAllRealMaterByDateForPrintCost(String date, int supId, String custId) throws GenericException;

	public List<Object[]> getExcelCustTotalRealMaterByDateMaterIdMaterLevel(String date, int supId, String custId, String materId, String materLevel)
			throws GenericException;

	public List<Code> findCodes() throws GenericException;

	public List<Object> getMaxSupplierDistributeDisId(String disDate, long supId) throws GenericException;

	public void deleteSupplierQualification(int qid) throws GenericException;

	public List<SupplierPo> getAllSup() throws GenericException;

	public List<DistributorSupplierMaterPo> getDistributorSupplierMaterPo(DistributorSupplierMaterVo c) throws GenericException;

	public List<SupplierPo> getSupByMaterType(int materType) throws GenericException;

	public List<Object[]> getMaterValueCostByMaterId(int materId, int supId) throws GenericException;

}
